home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / umich / falcon / programm.ing / nt_dsp1.lzh / NT_DSP1.MSA / LFLTS / LATFIR1T.ASM < prev    next >
Assembly Source File  |  1989-01-24  |  1KB  |  50 lines

  1. ;
  2. ; This program originally available on the Motorola DSP bulletin board.
  3. ; It is provided under a DISCLAMER OF WARRANTY available from
  4. ; Motorola DSP Operation, 6501 Wm. Cannon Drive W., Austin, Tx., 78735.
  5. ; Lattice FIR Filter Macro. (test program)
  6. ; Last Update 08 Aug 86   Version 1.0
  7. ;
  8. ;
  9. ;       lattice FIR test program
  10. ;
  11.         opt     cex
  12.         page    132,66,0,10
  13.         nolist
  14.         include 'dsplib:ioequ'
  15.         list
  16.         include 'dsplib:latfir1'
  17.  
  18. order   equ     3               ;3 coefficient lattice
  19. datin   equ     $ffff           ;location in Y memory of input file
  20. datout  equ     $fffe           ;location in Y memory of output file
  21. npts    equ     20              ;number of points to process
  22.  
  23.         org     x:0
  24. state   ds      10              ;filter states
  25.  
  26.         org     y:0
  27. kadd    dc      .5,-.5,.2       ;reflection coefficients, k1,k2,k3
  28.  
  29.         org     p:$100
  30. start
  31.         movep   #0,x:M_BCR      ;no wait states on external i/o
  32.  
  33.         move    #state,r0       ;point to filter states
  34.         move    #order,m0       ;mod on filter states
  35.         move    #kadd,r4        ;point to reflection coefficients
  36.         move    #order,m4       ;mod on reflection coefficients
  37.  
  38.         do      #npts,_endp
  39.  
  40.         movep   y:datin,b       ;get sample, set t
  41.  
  42.         latfir1 order           ;do lattice fir
  43.  
  44.         movep   b,y:datout              ;output sample
  45. _endp
  46.  
  47.         END
  48.